package com.yx.robot.bean.robot;

/**
 * 固件升级信息
 * <p>
 * "desc"	            string	升级内容
 * "upgradeStatus" 		int	    升级状态
 * "newVersion" 		string	最新版本
 * "currentVersion"	    string	使用版本
 * "upgradeType"	    int	    升级类型
 * "progress"	        int	    升级进度
 */
public class FirmwareUpdateInfo implements Clear {
    private String desc;
    private int upgradeStatus;
    private int progress;
    private String newVersion;
    private String currentVersion;
    private int upgradeType;
    private int state;
    private boolean check;
    private String version;

    public FirmwareUpdateInfo() {
        clear();
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public boolean isCheck() {
        return check;
    }

    public void setCheck(boolean check) {
        this.check = check;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getUpgradeType() {
        return upgradeType;
    }

    public void setUpgradeType(int upgradeType) {
        this.upgradeType = upgradeType;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public int getUpgradeStatus() {
        return upgradeStatus;
    }

    public void setUpgradeStatus(int upgradeStatus) {
        this.upgradeStatus = upgradeStatus;
    }

    public String getNewVersion() {
        return newVersion;
    }

    public void setNewVersion(String newVersion) {
        this.newVersion = newVersion;
    }

    public String getCurrentVersion() {
        return currentVersion;
    }

    public void setCurrentVersion(String currentVersion) {
        this.currentVersion = currentVersion;
    }

    public int getProgress() {
        return progress;
    }

    public void setProgress(int progress) {
        this.progress = progress;
    }

    @Override
    public String toString() {
        return "FirmwareUpdateInfo{" +
                "desc='" + desc + '\'' +
                ", upgradeStatus=" + upgradeStatus +
                ", progress=" + progress +
                ", newVersion='" + newVersion + '\'' +
                ", currentVersion='" + currentVersion + '\'' +
                ", upgradeType=" + upgradeType + '\'' +
                ", state=" + state + '\'' +
                ", check=" + check + '\'' +
                ", version=" + version +
                '}';
    }

    @Override
    public void clear() {
        desc = null;
        upgradeStatus = 0;
        progress = -1;
        newVersion = null;
        currentVersion = null;
        upgradeType = -1;
        state = 0;
        check = false;
        version = null;
    }
}
